package com.huaru.message;

//import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
//@MapperScan("com.huaru.message.mapper")
@EnableScheduling
@ComponentScan("com.huaru.message")
public class TotalApplication {//implements CommandLineRunner{
	public static void main(String[] args) {

		SpringApplicationBuilder builder = new SpringApplicationBuilder(TotalApplication.class);
		builder.headless(false).web(WebApplicationType.SERVLET).run(args);
		System.out.println(".   ____          _            __ _ _\n" +
				" /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n" +
				"( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n" +
				" \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n" +
				"  '  |____| .__|_| |_|_| |_\\__, | / / / /\n" +
				" =========|_|==============|___/=/_/_/_/启动成功");
	}

//	@Override
//	public void run(String... args) throws Exception {
//		try {
//			//启动站间通信开启 之前端口号5476
//			new Thread(() -> new StartupEvent().receiveUdpdata(6947)).start();
//			System.out.println("站间通信开启成功.....");
//		}catch (Exception e){
//			e.printStackTrace();
//			System.out.println("站间通信开启失败.....");
//		}
//	}
}

